#include "stdafx.h"
#include "DBHelper.h"
#include "DALUserInfo.h"

BOOL CDALUserInfo::UserLogin(CString UserName, CString UserPassword)
{
	CString sql = "SELECT TOP 1 * FROM UserInfo WHERE UserName = '" + UserName + "' AND UserPassword = '" + UserPassword + "'";
	return m_dbhelper.IsExist(sql);
}

BOOL CDALUserInfo::UserUpdatePassword(CString UserName, CString UserPassword)
{
	CString sql = "UPDATE UserInfo SET UserPassword = '" + UserPassword + "' WHERE UserName = '" + UserName + "'";
	return m_dbhelper.ExecuteNonQuery(sql);
}